﻿using Coldairarrow.Business.Base_Manage;
using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Util;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Api.Controllers.Base_Manage
{
    /// <summary>
    /// 组织机构类型
    /// </summary>
    [Route("/Base_Manage/[controller]/[action]")]
    public class Base_DepartmentTypeController : BaseApiController
    {
        #region DI

        public Base_DepartmentTypeController(IBase_DepartmentTypeBusiness base_DepartmentTypeBus)
        {
            _base_DepartmentTypeBus = base_DepartmentTypeBus;
        }

        IBase_DepartmentTypeBusiness _base_DepartmentTypeBus { get; }

        #endregion

        #region 获取
        /// <summary>
        /// 获取组织机构类型
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<PageResult<Base_DepartmentType>> GetDataList(PageInput<ConditionDTO> input)
        {
            return await _base_DepartmentTypeBus.GetDataListAsync(input);
        }

        //[HttpPost]
        //public async Task<Base_DepartmentType> GetTheData(IdInputDTO input)
        //{
        //    return await _base_DepartmentTypeBus.GetTheDataAsync(input.id);
        //}

        #endregion

        #region 提交

        //[HttpPost]
        //public async Task SaveData(Base_DepartmentType data)
        //{
        //    if (data.Id.IsNullOrEmpty())
        //    {
        //        InitEntity(data);

        //        await _base_DepartmentTypeBus.AddDataAsync(data);
        //    }
        //    else
        //    {
        //        await _base_DepartmentTypeBus.UpdateDataAsync(data);
        //    }
        //}

        //[HttpPost]
        //public async Task DeleteData(List<string> ids)
        //{
        //    await _base_DepartmentTypeBus.DeleteDataAsync(ids);
        //}

        #endregion
    }
}